import request from "@/utils/request";

// 分页查询列表操作
export function page(query) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/yxpz/qlCaseService/queryDoneQlCasePage",
    method: "get",
    params: query
  });
}

// 新增或者修改
export function saveOrUpdate(data) {
  return request({
    url: process.env.VUE_APP_KSTB_ROUTE_PATH + "/doneBusiness/saveOrUpdate",
    method: "post",
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    },
    data: data
  });
}

//获取登录机构主键
export function checkedCase(caseOid) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/doneBusiness/checkedCase?caseOid=" +
      caseOid,
    method: "post"
  });
}

/**
 * 查询可以手动办结的数据
 * @param {*} params
 * @returns
 */
export function queryCaseFinishAble(params) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/yxpz/qlCaseService/queryCaseFinishAble",
    method: "get",
    params: params
  });
}

/**
 * 手动办结的操作
 * @param {*} params
 */
export function caseHandleFinish(params) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/yxpz/qlCaseService/caseHandleFinish",
    method: "get",
    params: params
  });
}
